﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Clothes.Model;
using Clothes.IBLL;
using Clothes.IDAL;
using Clothes.DAL;
using Clothes.Comment;

namespace Clothes.BLL
{
    public class CLDressBLL : CLDressIBLL
    {
        CLDressIDAL  dressDAL = new CLDressDAL();
        public bool CLDressInsert(CLDress lDress)
        {
            return dressDAL.Insert(lDress);
        }

        public List<CLDress> SelctOrderByBLL()
        {
           return dressDAL.SelctOrderBy();
        }

        public OperResult<List<CLDress>> Select(int nan)
        {
            var list= dressDAL.Select(b =>b.TypeId==nan).ToList();
            return OperResult<List<CLDress>>.Success(list);
        }

        public List<CLDress> SelecrLei(int id) {
            return dressDAL.Select(a=>a.TypeId==id);
        }

        public CLDress SelectId(int id)
        {
            return dressDAL.Tiao(a => a.Id == id);
        }

        public bool Edit(int id, int shu)
        {
            return dressDAL.Edit(id,shu);
        }
    }
}
